package io.renren.modules.video.controller;

import io.renren.common.utils.MySpider;
import io.renren.common.utils.R;
import io.renren.modules.video.FileUtils;
import io.renren.modules.video.entity.FileEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;

@RestController
@RequestMapping("/file")
public class FileController {

    @GetMapping("/search")
    public R getFile() throws IOException {
        String path="D:\\wenjian\\测试";
        List<FileEntity> filePaths = MySpider.getFileEntiys("https://18comic.vip/");
        return R.ok().put("list",filePaths);
    }
}
